package cn.com.huzo.model.entities.trade;

import huzofw.model.entities.BaseEntity;
import huzofw.model.entities.IAggregateRoot;
import java.io.Serializable;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * 售货合同明细记录实体类
 * <p>
 * @author 范学春
 */
public class SalesContractLinesEntity extends BaseEntity implements Serializable, IAggregateRoot {

    private static final long serialVersionUID = 4684652753115958545L;
    private String LinesId;                   // 明细标识
    private Long HeaderId;                    // 所属主记录标识
    private String ShippingMarkNo;
    private Long ProductId;
    private String NoOfStyle;
    private String ProductName;
    private Float Quantity;
    private Float UnitPrice;
    private String Component;
    private String CurrencyName;              // 货币单位（销售发票用）

    public String getLinesId() {
        return LinesId;
    }

    public void setLinesId(String LinesId) {
        this.LinesId = LinesId;
    }

    public Long getHeaderId() {
        return HeaderId;
    }

    public void setHeaderId(Long HeaderId) {
        this.HeaderId = HeaderId;
    }

    public String getShippingMarkNo() {
        return ShippingMarkNo;
    }

    public void setShippingMarkNo(String ShippingMarkNo) {
        this.ShippingMarkNo = ShippingMarkNo;
    }

    public Long getProductId() {
        return ProductId;
    }

    public void setProductId(Long ProductId) {
        this.ProductId = ProductId;
    }

    public String getNoOfStyle() {
        return NoOfStyle;
    }

    public void setNoOfStyle(String NoOfStyle) {
        this.NoOfStyle = NoOfStyle;
    }

    public String getProductName() {
        return ProductName;
    }

    public void setProductName(String ProductName) {
        this.ProductName = ProductName;
    }

    public Float getQuantity() {
        return Quantity;
    }

    public void setQuantity(Float Quantity) {
        this.Quantity = Quantity;
    }

    public Float getUnitPrice() {
        return UnitPrice;
    }

    public void setUnitPrice(Float UnitPrice) {
        this.UnitPrice = UnitPrice;
    }

    public String getComponent() {
        return Component;
    }

    public void setComponent(String Component) {
        this.Component = Component;
    }

    public String getCurrencyName() {
        return CurrencyName;
    }

    public void setCurrencyName(String CurrencyName) {
        this.CurrencyName = CurrencyName;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof SalesContractLinesEntity)) {
            return false;
        }

        final SalesContractLinesEntity that = (SalesContractLinesEntity) o;

        return new EqualsBuilder()
                .append(this.getLinesId(), that.getLinesId())
                .isEquals();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + this.getLinesId().hashCode();

        return result;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
